package com.core.request.pojo;

import com.util.Consts;

public class VisaAddUpdateDto {
	private Long visaInfoId;

	// 番号
	private String destVisaId;

	// 送签社code
	private String chinaAgentCode;
	// 签证类型
	private String visaType;
	private String visaType1;
	private String visaType2;

	private String applicantName;
	private String applicantPinyin;

	private Integer otherPersonNum;

	// 入境日期
	private String arrivalDate;

	// 出境日期
	private String departureDate;

	private String visaStayPrefList;

	private String visaVistType;

	private String visaVistPrefList;

	public VisaAddUpdateDto(VisaAddUpdateDtoSql visaAddUpdateDtoSql) {
		this.visaInfoId = visaAddUpdateDtoSql.getVisaInfoId();

		this.destVisaId = visaAddUpdateDtoSql.getDestVisaId();

		// 送签社code
		this.chinaAgentCode = visaAddUpdateDtoSql.getChinaAgentCode();

		// 签证类型
		if (Consts.VISA_TYPE_GROUP == Integer.valueOf(visaAddUpdateDtoSql.getVisaType())) {
			this.visaType = "1";
			this.visaType1 = "1";
		} else if (Consts.VISA_TYPE_SINGLE == Integer.valueOf(visaAddUpdateDtoSql.getVisaType())) {
			this.visaType = "2";
			this.visaType1 = "2";
		} else if (Consts.VISA_TYPE_10CHEAP == Integer.valueOf(visaAddUpdateDtoSql.getVisaType())) {
			this.visaType = "4";
			this.visaType1 = "N";
			this.visaType2 = "4";
		} else if (Consts.VISA_TYPE_NORTH6 == Integer.valueOf(visaAddUpdateDtoSql.getVisaType())) {
			this.visaType = "3";
			this.visaType1 = "N";
			this.visaType2 = "3";
		}

		//
		this.applicantName = visaAddUpdateDtoSql.getApplicantName();
		this.applicantPinyin = visaAddUpdateDtoSql.getApplicantPinyin();

		this.otherPersonNum = visaAddUpdateDtoSql.getOtherPersonNum();

		// 入境日期
		this.arrivalDate = visaAddUpdateDtoSql.getArrivalDate();

		// 出境日期
		this.departureDate = visaAddUpdateDtoSql.getDepartureDate();

		this.visaStayPrefList = poundAsEmpty(visaAddUpdateDtoSql.getIsStateNorthCountry());
		this.visaVistType = poundAs0(visaAddUpdateDtoSql.getIsPastCome());
		this.visaVistPrefList = poundAsEmpty(visaAddUpdateDtoSql.getPastCameRecord());
	}

	private String poundAsEmpty(String str) {
		return "#".equals(str) ? "" : str;
	}

	private String poundAs0(String str) {
		return "#".equals(str) ? "0" : str;
	}

	public String getChinaAgentCode() {
		return chinaAgentCode;
	}

	public Long getVisaInfoId() {
		return visaInfoId;
	}

	public void setVisaInfoId(Long visaInfoId) {
		this.visaInfoId = visaInfoId;
	}

	public void setChinaAgentCode(String chinaAgentCode) {
		this.chinaAgentCode = chinaAgentCode;
	}

	public String getVisaType() {
		return visaType;
	}

	public void setVisaType(String visaType) {
		this.visaType = visaType;
	}

	public String getVisaType1() {
		return visaType1;
	}

	public void setVisaType1(String visaType1) {
		this.visaType1 = visaType1;
	}

	public String getVisaType2() {
		return visaType2;
	}

	public void setVisaType2(String visaType2) {
		this.visaType2 = visaType2;
	}

	public String getApplicantName() {
		return applicantName;
	}

	public void setApplicantName(String applicantName) {
		this.applicantName = applicantName;
	}

	public String getApplicantPinyin() {
		return applicantPinyin;
	}

	public void setApplicantPinyin(String applicantPinyin) {
		this.applicantPinyin = applicantPinyin;
	}

	public Integer getOtherPersonNum() {
		return otherPersonNum;
	}

	public void setOtherPersonNum(Integer otherPersonNum) {
		this.otherPersonNum = otherPersonNum;
	}

	public String getArrivalDate() {
		return arrivalDate;
	}

	public void setArrivalDate(String arrivalDate) {
		this.arrivalDate = arrivalDate;
	}

	public String getDepartureDate() {
		return departureDate;
	}

	public void setDepartureDate(String departureDate) {
		this.departureDate = departureDate;
	}

	public String getVisaVistType() {
		return visaVistType;
	}

	public void setVisaVistType(String visaVistType) {
		this.visaVistType = visaVistType;
	}

	public String getVisaStayPrefList() {
		return visaStayPrefList;
	}

	public void setVisaStayPrefList(String visaStayPrefList) {
		this.visaStayPrefList = visaStayPrefList;
	}

	public String getVisaVistPrefList() {
		return visaVistPrefList;
	}

	public void setVisaVistPrefList(String visaVistPrefList) {
		this.visaVistPrefList = visaVistPrefList;
	}

	public String getDestVisaId() {
		return destVisaId;
	}

	public void setDestVisaId(String destVisaId) {
		this.destVisaId = destVisaId;
	}

}
